/*************************************************************************
	> File Name: main.c
	> Author: 
	> Mail: 
	> Created Time: Wed 05 Nov 2025 09:51:25 PM CST
 ************************************************************************/

#include<stdio.h>
#include"myprocess2.h"
double total=1024;
double speed=1;
void DownLoad()
{
    double cur=0;
    while(cur<total)
    {
        FlussProcess(total,cur); //每次下载一点就把数据传过去 让进度条刷新

        //模拟下载
        usleep(5000);
        cur+=speed;
    }
        FlussProcess(total,cur); //每次下载一点就把数据传过去 让进度条刷新
     printf("\n");
    printf("%.2lf MB资源下载已完成\n",cur);
}
int main()
{
    DownLoad();
    DownLoad();
    DownLoad();
    DownLoad();
    DownLoad();
    DownLoad();
    return 0;
}
